* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    width: 85%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo h1 {
    color: #e74c3c;
    font-size: 24px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover, nav ul li a.active {
    color: #e74c3c;
}

.btn {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-login {
    background-color: transparent;
    color: #e74c3c;
    border: 1px solid #e74c3c;
    margin-right: 10px;
}

.btn-register {
    background-color: #e74c3c;
    color: white;
}

.btn-login:hover {
    background-color: #e74c3c;
    color: white;
}

.btn-register:hover {
    background-color: #c0392b;
}

/* 搜索栏样式 */
.search-container {
    background-color: #f9f9f9;
    padding: 20px 0;
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.search-box input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

.search-box button {
    padding: 10px 20px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
}

/* 商品分类样式 */
.categories {
    padding: 40px 0;
    background-color: #fff;
}

.categories h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.category-list {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.category-item {
    flex: 0 0 23%;
    text-align: center;
    margin-bottom: 20px;
}

.category-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.category-item p {
    font-weight: 500;
}

/* 推荐商品样式 */
.featured-products {
    padding: 40px 0;
    background-color: #f4f4f4;
}

.featured-products h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.product-slider {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.product-card {
    flex: 0 0 31%;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card h3 {
    padding: 15px;
    font-size: 18px;
}

.price {
    color: #e74c3c;
    font-weight: bold;
    padding: 0 15px 10px;
    font-size: 18px;
}

.btn-add-to-cart {
    display: block;
    padding: 8px 0;
    background-color: #e74c3c;
    color: white;
    border: none;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    margin: 0 15px 15px;
}

.btn-add-to-cart:hover {
    background-color: #c0392b;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.pagination a {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 5px;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pagination a.active {
    background-color: #e74c3c;
    color: white;
}

.pagination a:hover:not(.active) {
    background-color: #f1f1f1;
}

/* 页脚样式 */
footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}